<template>
  <div class="hello">
    <h1>{{msg}}</h1>
    <p>{{$route.name}} - {{$route.params.username}}</p>
    <router-link to="/vav">vav</router-link> |
    <router-link to="/goback">返回主页</router-link>
    <router-link to="/goNewContent/199/londy">新闻内页</router-link>
  </div>
</template>
<script>
export default {
  data () {
    return {
      msg: 'Hi, I am Londy'
    }
  },
  beforeRouteEnter: (to, from, next) => {
    console.log('准备进入路由模板')
    next()
  },
  beforeRouteLeave: (to, from, next) => {
    console.log('准备离开路由模板')
    next()
  }
}
</script>
<style scoped lang="sass">

</style>
